//
//  WmcAlbumProjectsChangeAuthorizationView.swift
//  YPWatermarkCamera
//
//  Created by 赵新 on 2022/3/22.
//

import UIKit

class WmcSystemAlbumChangeAuthorizationView: WmcBaseView {
    lazy var changeAuthorizationBtn: UIButton = {
        let btn = UIButton()
        btn.setTitle("修改授权", for: .normal)
        btn.setTitleColor(.white, for: .normal)
        btn.backgroundColor = .wmc_mainTheme
        btn.titleLabel?.font = 12.wmc_font
        btn.titleLabel?.textAlignment = .center
        btn.layer.cornerRadius = 4
        btn.layer.masksToBounds = true
        return btn
    }()

    lazy var titleLabel: UILabel = {
        let label = UILabel.YP.Create(text: "当前授权仅访问部分照片",
                                      font: 14,
                                      color: UIColor.wmc_mainTheme,
                                      alignment: .left)
        return label
    }()

    override func makeUI() {
        backgroundColor = .wmc_mainTheme.yp.alpha(0.15)

        addSubview(changeAuthorizationBtn)
        changeAuthorizationBtn.snp.makeConstraints { make in
            make.top.equalTo(8)
            make.right.equalTo(-Wmc_standardEdge.right)
            make.bottom.equalTo(-8)
            make.width.equalTo(56.wmc_autoHor)
        }

        addSubview(titleLabel)
        titleLabel.snp.makeConstraints { make in
            make.top.bottom.equalToSuperview()
            make.left.equalTo(Wmc_standardEdge.left)
            make.right.equalTo(changeAuthorizationBtn.snp.left).offset(-8)
        }
    }
}
